/*
 * @Copyright: 2017 www.yyfax.com Inc. All rights reserved.
 */
package com.yyfax.pay.order.data.service;

import com.yyfax.pay.order.model.po.PayOrderExtPO;

/**
 * 支付订单附加信息服务接口
 *
 * @author buyi
 * @date 2017-04-12 11:09:15
 * @since 1.0.0
 */
public interface PayOrderExtService {
	/**
	 * 根据主键查询实体
	 *
	 * @author buyi
	 * @date 2017年4月3日上午1:28:16
	 * @since 1.0.0
	 * @param id 主鍵
	 * @param merchantCode 商户编号(分表预留参数)
	 * @return
	 * @throws Exception
	 */
	public PayOrderExtPO queryByIdAndMerchantCode(int id, String merchantCode) throws Exception;

	/**
	 * 保存实体对象
	 *
	 * @author buyi
	 * @date 2017年4月3日上午1:28:22
	 * @since 1.0.0
	 * @param po 实体对象
	 * @return 返回主鍵，如果返回-1,0表示失败
	 * @throws Exception
	 */
	public int save(PayOrderExtPO po) throws Exception;

	/**
	 * 更新手机号码
	 * 
	 * @author buyi
	 * @date 2017-04-26 14:27:47
	 * @since v1.0.0
	 * @param id
	 * @param phone
	 * @throws Exception
	 */
	public int modifyPhone(int id, String phone) throws Exception;

	/**
	 * 查询订单附加信息
	 * 
	 * @author buyi
	 * @date 2017-04-16 11:47:58
	 * @since v1.0.0
	 * @param payOrderId
	 * @param merchantCode
	 * @return
	 */
	public PayOrderExtPO queryByPayOrderId(String payOrderId, String merchantCode);
	
	/**
	 * 删除订单附加信息
	 * 
	 * @author buyi
	 * @date 2017-05-15 20:00:08
	 * @since v1.0.0
	 *
	 * @param payOrderId
	 * @return
	 */
	public int remove(String payOrderId);

}
